package com.application.Activity;

import java.util.ArrayList;

import com.application.Network.Protocol;
import com.application.outdoor.InvoikeServices.LogThaoTacInvoike;
import com.application.outdoor.adapter.LogThaoTacAdapter;
import com.application.outdoor.pojo.LogThaoTacPOJO;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.ListView;
import android.support.v4.app.NavUtils;

public class od_LogThaoTacAcivity extends Activity {
	
	ArrayList<LogThaoTacPOJO> data;
	public static int idCay=-1;
	
	ListView lvLog;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.od_activity_log_thao_tac);
        lvLog=(ListView)findViewById(R.id.lvLog);
        fillList();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.od_activity_log_thao_tac, menu);
        return true;
    }

    private void fillList(){
    	String rs=new LogThaoTacInvoike().get(idCay);
//    	try{
    		data=LogThaoTacPOJO.parseList(rs);
    		LogThaoTacAdapter adapter=new LogThaoTacAdapter(getBaseContext(), data);
    		lvLog.setAdapter(adapter);
//    	}catch (Exception e) {
//			Log.e(Protocol.TAG,"Không parse đc list LogThaoTac");
//		}
    	
    	
    }
}
